package com.shujia.homework.exer1;

public class Cylinder extends Circle {
    protected double h;


    public double getH() {
        return h;
    }

    public void setH(double h) {
        this.h = h;
    }

    public void printInfo() {
        // 输出其轴心位置坐标、半径、面积、高及其体积的值
        System.out.println(x);
        System.out.println(y);
        System.out.println(r);
        double area = Math.PI * r * r;
        System.out.println(area);
        System.out.println(h);
        System.out.println(area * h);
    }
}
